package com.ruoyi.point.domain;

import java.math.BigDecimal;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 积分商城商品对象 mall_goods
 * 
 * @author ruoyi
 * @date 2025-08-12
 */
public class MallGoods extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品ID */
    private Integer id;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 商品封面图 */
    @Excel(name = "商品封面图")
    private String coverImg;

    /** 兑换所需积分 */
    @Excel(name = "兑换所需积分")
    private Long point;

    /** 原价 */
    @Excel(name = "原价")
    private BigDecimal originalPrice;

    /** 库存 */
    @Excel(name = "库存")
    private Long stock;

    /** 销量 */
    @Excel(name = "销量")
    private Long sales;

    /** 有效期天数 */
    @Excel(name = "有效期天数")
    private Long validityDays;

    /** 状态：0-上架，1-下架 */
    @Excel(name = "状态：0-上架，1-下架")
    private Long status;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String desc;

    /** 关联规格表 */
    @Excel(name = "关联规格表")
    private String specId;

    /** 是否删除：0正常 1删除 */
    private Integer del;

    // 多表联查字段
    /** 商品规格信息集合 */
    private List<MallGoodsSpec> specifications;

    /** 兑换次数统计 */
    private Long exchangeCount;

    /** 销量排序权重（用于Redis ZSet） */
    private Double salesWeight;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setCoverImg(String coverImg) 
    {
        this.coverImg = coverImg;
    }

    public String getCoverImg() 
    {
        return coverImg;
    }

    public void setPoint(Long point) 
    {
        this.point = point;
    }

    public Long getPoint() 
    {
        return point;
    }

    public void setOriginalPrice(BigDecimal originalPrice) 
    {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getOriginalPrice() 
    {
        return originalPrice;
    }

    public void setStock(Long stock) 
    {
        this.stock = stock;
    }

    public Long getStock() 
    {
        return stock;
    }

    public void setSales(Long sales) 
    {
        this.sales = sales;
    }

    public Long getSales() 
    {
        return sales;
    }

    public void setValidityDays(Long validityDays) 
    {
        this.validityDays = validityDays;
    }

    public Long getValidityDays() 
    {
        return validityDays;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setDesc(String desc) 
    {
        this.desc = desc;
    }

    public String getDesc() 
    {
        return desc;
    }

    public void setSpecId(String specId) 
    {
        this.specId = specId;
    }

    public String getSpecId() 
    {
        return specId;
    }

    public void setDel(Integer del) 
    {
        this.del = del;
    }

    public Integer getDel() 
    {
        return del;
    }

    // 多表联查字段的getter和setter
    public List<MallGoodsSpec> getSpecifications() {
        return specifications;
    }

    public void setSpecifications(List<MallGoodsSpec> specifications) {
        this.specifications = specifications;
    }

    public Long getExchangeCount() {
        return exchangeCount;
    }

    public void setExchangeCount(Long exchangeCount) {
        this.exchangeCount = exchangeCount;
    }

    public Double getSalesWeight() {
        return salesWeight;
    }

    public void setSalesWeight(Double salesWeight) {
        this.salesWeight = salesWeight;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("coverImg", getCoverImg())
            .append("point", getPoint())
            .append("originalPrice", getOriginalPrice())
            .append("stock", getStock())
            .append("sales", getSales())
            .append("validityDays", getValidityDays())
            .append("status", getStatus())
            .append("desc", getDesc())
            .append("specId", getSpecId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("del", getDel())
            .toString();
    }
}
